package com.caiyigo.baihua.service;

import java.util.List;

import com.caiyigo.baihua.dto.Result;
import com.caiyigo.baihua.dto.RoleDto;
import com.caiyigo.baihua.dto.Tree;
import com.caiyigo.baihua.model.SystemRole;

/**
 * @author caihaihui
 * 
 */
public interface RoleService {
	int deleteByPrimaryKey(Integer id);
	int deleteByPid(Integer id);
	int insert(SystemRole record);

	int insertSelective(SystemRole record);

	SystemRole selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(SystemRole record);

	int updateByPrimaryKey(SystemRole record);

	List<RoleDto> list();

	List<String> getRolesName(String name);

	List<SystemRole> getRole(int id);

	List<SystemRole> selectWherePidIsNull();

	List<SystemRole> selectByPid(int id);

	Result batchGrant(int roleId, String resIds);

	List<Tree> getTree(Integer id, Integer passId);

	boolean pidIsChild(Integer id, Integer pid);

	Result edit(SystemRole role);

	Result delete(Integer id);
}
